# Daemon communication interface (terribly simple, since the daemon
# only knows how to show health).

import urllib2

DAEMON_URL = 'http://localhost:8001'

def alive():
    try:
        res = urllib2.urlopen(DAEMON_URL)
    except urllib2.URLError:
        return False
    if not res:
        return False
    res.close()
    return True
